<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.6.0.js" type="text/javascript" charset="UTF-8"></script>
		<script>
			/* js */
			window.onload=function(){
				var div02 = document.getElementById("div02");
				div02.style.backgroundColor="red";
			}
			/* jquery */
			$(function(){
				console.log("页面加载完毕执行");
				$("div").css("font-size","2rem");
				$("#div03").css("background-color","green");
				$("#div02").css("color","green");
			})
		</script>
	</head>
	<body>
		<div id="div01">abc</div>
		<div id="div02">abc</div>
		<div id="div03">abc</div>
		<div id="div04">abc</div>
	</body>
</html>
